!!S matmul
	subroutine matmul (lp,l,mp,m,np,n,c,b,a)
c
c	generates the matrix product c = a*b.
c	a is an input matrix of dimensions m*n, stored in 
c	an array of physical dimensions mp*np.
c	b is an input matrix of dimensions n*l, stored in 
c	an array of physical dimensions np*lp.
c	c is the product matrix of dimensions m*l, stored in 
c	an array of physical dimensions mp*lp.
c
c	J. Langowski 1989
c
	implicit none
	integer*4 np,n,mp,m,lp,l
	real*4 a(mp,np),b(np,lp),c(mp,lp)
	
	real*4 sum
	integer*4 i,j,k
	
	do i=1,l
		do j=1,m
			sum=0.
			do k=1,n
				sum = sum + a(j,k)*b(k,i)
			end do
			c(j,i) = sum
		end do
	end do
	
	return
	end
